﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nameero.util
{
    /* Jednostavan Node razred.. Čisto osnono za šetanje po njemu.. Kasnije ćemo dodati GameState i generiranje djece. */
    class Node
    {
        private int depth;
        private int alphaBetaValue;
        private Node parent;
        List<Node> children;
        private GameState gameState;

        public Node()
        {
            this.alphaBetaValue = Int32.MinValue;
            this.depth = 0;
            this.parent = null;
            this.children = new List<Node>();
            }


        public Node(Node parent)
        {
            this.alphaBetaValue = Int32.MinValue;
            this.parent = parent;
            this.depth = parent.depth + 1;
            this.children = new List<Node>();
        }

        public void addChild(Node child) {
            children.Add(child);
        }

        public List<Node> getChildren()
        {
            return children;
        }

        public int getDepth()
        {
            return depth;
        }

        public Node getParent()
        {
            return parent;
        }

        public int getAlphaBetaValue()
        {
            return alphaBetaValue;
        }
        public GameState getGameState()
        {
            return gameState;
        }
        public void setAlphaBetaValue(int value)
        {
            this.alphaBetaValue = value;
        }
        public void setGameState(GameState state)
        {
            this.gameState = new GameState(state);
        }



    }
}
